home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / PERMONST.H < prev    next >
C/C++ Source or Header  |  1993-03-16  |  3KB  |  99 lines

  1. /*    SCCS Id: @(#)permonst.h    3.0    88/04/05
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. #ifndef PERMONST_H
  6. #define PERMONST_H
  7.  
  8. /*    This structure covers all attack forms.
  9.  *    aatyp is the gross attack type (eg. claw, bite, breath, ...)
  10.  *    adtyp is the damage type (eg. physical, fire, cold, spell, ...)
  11.  *    damn is the number of hit dice of damage from the attack.
  12.  *    damd is the number of sides on each die.
  13.  *
  14.  *    Some attacks can do no points of damage.  Additionally, some can
  15.  *    have special effects *and* do damage as well.  If damn and damd
  16.  *    are set, they may have a special meaning.  For example, if set
  17.  *    for a blinding attack, they determine the amount of time blinded.
  18.  */
  19.  
  20. struct attack {
  21.     uchar           aatyp;
  22.     uchar           adtyp, damn, damd;
  23. };
  24.  
  25. /*    Max # of attacks for any given monster.
  26.  */
  27.  
  28. #define    NATTK    5
  29.  
  30. #include "monattk.h"
  31. #include "monflag.h"
  32.  
  33. struct permonst {
  34.  
  35. #if defined(SMALLDATA) && !defined(MAKEDEFS_C)
  36.     char        mname[24], mlet;        /* full name and sym */
  37. #else
  38.     const char    *mname;            /* full name */
  39.     char        mlet;            /* symbol */
  40. #endif
  41.     schar        mlevel,            /* base monster level */
  42.             mmove,            /* move speed */
  43.             ac,            /* (base) armor class */
  44.             mr,            /* (base) magic resistance */
  45.             maligntyp;        /* basic monster alignment */
  46.     unsigned    geno;            /* creation/geno mask value */
  47.     struct    attack    mattk[NATTK];        /* attacks matrix */
  48.     unsigned    cwt,            /* weight of corpse */
  49.             cnutrit;        /* its nutritional value */
  50.     short        pxlth;            /* length of extension */
  51.     uchar        msound;         /* noise it makes (6 bits) */
  52.     uchar        msize;            /* physical size (3 bits) */
  53.     long        mflags1,        /* boolean bitflags */
  54.             mflags2;        /* more boolean bitflags */
  55. # ifdef TEXTCOLOR
  56.     uchar        mcolor;            /* color to use */
  57. # endif
  58. };
  59.  
  60. extern struct permonst
  61. #if defined(SMALLDATA) && !defined(MAKEDEFS_C)
  62.             *mons;
  63. #else
  64.     NEARDATA    mons[];        /* the master list of monster types */
  65. #endif
  66. extern struct permonst NEARDATA playermon, NEARDATA *uasmon;
  67.                         /* you in the same terms */
  68.  
  69. #if defined(SMALLDATA) && defined(MAKEDEFS_C)
  70.  
  71. typedef struct pmpart {
  72.     char        mlet;            /* full name and sym */
  73.     schar        mlevel,            /* base monster level */
  74.             mmove,            /* move speed */
  75.             ac,            /* (base) armor class */
  76.             mr,            /* (base) magic resistance */
  77.             maligntyp;        /* basic monster alignment */
  78.     unsigned    geno;            /* creation/geno mask value */
  79.     struct    attack    mattk[NATTK];        /* attacks matrix */
  80.     unsigned    cwt,            /* weight of corpse */
  81.             cnutrit;        /* its nutritional value */
  82.     short        pxlth;            /* length of extension */
  83.     uchar        msound;            /* noise it makes */
  84.     long        mflags1,        /* boolean bitflags */
  85.             mflags2;        /* more boolean bitflags */
  86. # ifdef TEXTCOLOR
  87.     uchar        mcolor;            /* color to use */
  88. # endif
  89. } pmpart;
  90.  
  91. typedef struct pmstr {
  92.     char        mname[24];        /* full name and sym */
  93.     pmpart        pmp;
  94. } pmstr;
  95.  
  96. #endif
  97.  
  98. #endif /* PERMONST_H /**/
  99.